package com.java.wysnstudy.cc;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class Test {

    public static void main(String[] args) {
        JSONObject jsonObject3=new JSONObject();
        jsonObject3.put("name","北京低级开发工程师");
        JSONObject jsonObject2=new JSONObject();
        jsonObject2.put("childen",jsonObject3);
        JSONObject jsonObject=new JSONObject();
        jsonObject.put("childen",jsonObject2);
        System.out.println(jsonObject.toString());
        jsonObject =(JSONObject)jsonObject.get("childen");
        jsonObject =(JSONObject)jsonObject.get("childen");
        String name = jsonObject.getString("name");
        System.out.println(name);
/*        JSONObject jsonObject = JSONObject.fromObject(buffer.toString());
        Object object = jsonObject.get("items");
        JSONArray json1 = JSONArray.fromObject(object.toString());
        Object object1 = json1.get(0);*/
    }
}
